﻿<%@ Page Language="C#" MasterPageFile="~/web.master" AutoEventWireup="true" CodeBehind="pipeline_assignment_list.aspx.cs" Inherits="Shuba.Web.approval_assigment.pipeline_assignment_list" %>
<%@ Register Assembly="Shuba.Framework" Namespace="Shuba.Framework" TagPrefix="cc" %>
<asp:Content ID="Header1" ContentPlaceHolderID="HeaderPlaceHolder" runat="server">

    <script type="text/javascript">
		function PrintThis() {
			var txt = document.getElementById('<%= txtSearch.ClientID %>').value;
			window.open("pipeline_assignment_excel.aspx?txtSearch=" + txt);
		}
		 function CheckAll()
        {
            var checkVal;
            if(document.all("ButSelect").value == "Check All")
            {
                checkVal = true;
                document.all("ButSelect").value = "Un-Check All";
            }else
            {
                checkVal = false;
                document.all("ButSelect").value = "Check All";
            }
            
            for (var n = 0; n < document.forms[0].length; n++) 
            {
                elm = document.forms[0].elements[n];
                if (elm.type == 'checkbox') 
                {
                    elm.checked = checkVal;
                }
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="text" border="0" width="100%" cellspacing="0" cellpadding="2">
        <tr>
            <td class="text bg_content" bgcolor="#FFFFFF" align="center">
                <p>&nbsp;</p>
                <table class="black" border="0" width="95%" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="title_back" align="left">
					    <table class="text" border="0" width="100%" cellspacing="0" cellpadding="0">
					    <tr>
					    <td class="title_back2" width="2%">&nbsp;</td>
					    <td class="title_back2 title_white" width="38%"><asp:Label ID="LabelTitle" runat="server" Text="Label"></asp:Label></td>
					    <td><span class="title_right"></span></td>
					    </tr>
					    </table>
                        </td>
                        <td class="title_back" align="right">
                        </td>
                    </tr>
                    <tr>
                        <td class="border_left bg_subtitle_white">&nbsp;&nbsp;&nbsp;List</td>
                        <td class="border_right bg_subtitle" align="right">
                            Full Name&nbsp;<asp:TextBox ID="txtSearch" CssClass="text" runat="server"></asp:TextBox>&nbsp;
                            <asp:Button ID="btnSearch" CssClass="buttonsmall" runat="server" Text="Search" 
                                OnClick="btnSearch_Click"/>&nbsp;&nbsp;
                            <input type="button" value="Export to Excel" onclick="PrintThis();" class="button" />&nbsp;&nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td class="border" colspan="2">
                            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                <ContentTemplate>
                                    <cc:SHUBAGrid ID="gvList" runat="server" AutoGenerateColumns="False" Width="100%" 
                                        DataKeyNames="ROW_ID"
                                        AllowPaging="True" PageSize="20" OnPageIndexChanging="gvList_PageIndexChanging"
                                        AllowSorting="True" OnSorting="gvList_Sorting">
                                        <Columns>
                                            <asp:HyperLinkField DataNavigateUrlFields="ROW_ID" DataNavigateUrlFormatString="pipeline_assignment.aspx?id={0}" DataTextField="FULL_NAME" HeaderText="NAMA LENGKAP" ItemStyle-HorizontalAlign="Left" SortExpression="FULL_NAME" />
                                            <asp:HyperLinkField DataNavigateUrlFields="ROW_ID" DataNavigateUrlFormatString="pipeline_assignment.aspx?id={0}" DataTextField="JENIS_USAHA" HeaderText="JENIS USAHA" ItemStyle-HorizontalAlign="Left" SortExpression="JENIS_USAHA" />
                                            <asp:BoundField DataField="RENCANA_PLAFON" HeaderText="RENCANA PLAFON" SortExpression="RENCANA_PLAFON" DataFormatString="{0:n0}" ItemStyle-HorizontalAlign=Right/>
                                            <%--<asp:BoundField DataField="MOBILE_PHONE" HeaderText="TELEPON SELULAR" SortExpression="MOBILE_PHONE" ItemStyle-HorizontalAlign=Center />
                                            <asp:BoundField DataField="OFFICE_PHONE" HeaderText="TELEPON KANTOR" SortExpression="OFFICE_PHONE" ItemStyle-HorizontalAlign=Center />--%>
                                            <%--<asp:BoundField DataField="KODYA_KAB_BUSINESS" HeaderText="KODYA KAB" SortExpression="KODYA_KAB_BUSINESS" ItemStyle-HorizontalAlign=Left />
                                            <asp:BoundField DataField="KECAMATAN_BUSINESS" HeaderText="KECAMATAN" SortExpression="KECAMATAN_BUSINESS" ItemStyle-HorizontalAlign=Left />
                                            <asp:BoundField DataField="KELURAHAN_BUSINESS" HeaderText="KELURAHAN" SortExpression="KELURAHAN_BUSINESS" ItemStyle-HorizontalAlign=Left />
                                            <asp:BoundField DataField="ZIP_CODE_BUSINESS" HeaderText="KODE POS" SortExpression="ZIP_CODE_BUSINESS" ItemStyle-HorizontalAlign=Left />--%>
                                            <asp:BoundField DataField="ADDRESS_BUSINESS" HeaderText="ALAMAT USAHA" SortExpression="ADDRESS_BUSINESS" ItemStyle-HorizontalAlign=Left />
                                            <asp:BoundField DataField="PROSPECT_TYPE" HeaderText="PROSPECT TYPE" SortExpression="PROSPECT_TYPE" ItemStyle-HorizontalAlign=Center />
                                            <asp:BoundField DataField="DEBTOR_TYPE" HeaderText="DEBTOR TYPE" SortExpression="DEBTOR_TYPE" ItemStyle-HorizontalAlign=Center />
                                            <asp:BoundField DataField="CHANNELING" HeaderText="CHANNELING" SortExpression="CHANNELING" ItemStyle-HorizontalAlign=Center />
                                            <%--<asp:BoundField DataField="EKSTERNAL" HeaderText="EKSTERNAL" SortExpression="EKSTERNAL" ItemStyle-HorizontalAlign=Center />--%>
                                        </Columns>
                                        <PagerSettings Mode="Numeric" Visible="true" />
                                        <EmptyDataTemplate>
                                            <table class="text" width=100% cellpadding=0 cellspacing=0><tr><td class="bg_grid2" align=center>NO RECORD FOUND</td></tr></table>
                                        </EmptyDataTemplate>
                                    </cc:SHUBAGrid>
                            </ContentTemplate>
                            <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="gvList" EventName="PageIndexChanging"/>
                            <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click"/>
                            </Triggers>
                            </asp:UpdatePanel>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <ContentTemplate>
                                    <div id="footLink" class="bg_footer text" runat="server">
                                        <table width="100%">
                                            <tr>
                                                <td class="text">
                                                    <asp:ImageButton ID="firstLink" runat="server" CssClass="icon_first" OnClick="linkDataPage_Click"
                                                        ImageUrl="~/images/trans.gif" />
                                                    <asp:ImageButton ID="prevLink" runat="server" CssClass="icon_previous" OnClick="linkDataPage_Click"
                                                        ImageUrl="~/images/trans.gif" />
                                                    <asp:DropDownList ID="ddlPaging" runat="server" CssClass="text" OnSelectedIndexChanged="ddlPaging_IndexChange"
                                                        AutoPostBack="true">
                                                    </asp:DropDownList>
                                                    <asp:ImageButton ID="nextLink" runat="server" CssClass="icon_next" OnClick="linkDataPage_Click"
                                                        ImageUrl="~/images/trans.gif" />
                                                    <asp:ImageButton ID="lastLink" runat="server" CssClass="icon_last" OnClick="linkDataPage_Click"
                                                        ImageUrl="~/images/trans.gif" />
                                                </td>
                                                <td style="text-align: right">
                                                    <asp:Label ID="lblPage" runat="server" Text="Page" CssClass="text"></asp:Label>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="gvList" EventName="PageIndexChanging" />
                                    <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click" />
                                    <asp:AsyncPostBackTrigger ControlID="ddlPaging" EventName="SelectedIndexChanged" />
                                </Triggers>
                            </asp:UpdatePanel>
                        </td>
                    </tr>
                </table>
                <br />
			    <!-- Error Message -->
			    <table runat=server visible=false id="ErrBox" border="0" width="100%" cellspacing="0" cellpadding="2">
			    <tr>
			    <td class="bg_grid2" align=center><asp:Label ID="ErrMsg" runat="server" Text="" Font-Bold=true ForeColor="Red"></asp:Label></td>
			    </tr>
			    </table>
			    <!-- End Of Error Message -->
            </td>
        </tr>
    </table>
</asp:Content>